package com.example.apiproject.service.impl;/*
    @date 2024/2/17 - 10:20
    @author porter
 */

import com.example.apiproject.dao.ArticlesLablesDao;
import com.example.apiproject.entity.ArticlesLabels;
import com.example.apiproject.service.ArticlesLabelsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service("ArticlesLabelsService")
public class ArticlesLabelsServiceImpl implements ArticlesLabelsService {
    @Resource
    private ArticlesLablesDao articlesLablesDao;

    @Override
    public List<ArticlesLabels> queryAllLabels() {
        return articlesLablesDao.queryAllLabels();
    }

    @Override
    public void addLabel(ArticlesLabels label) {
        articlesLablesDao.insertLabel(label);

    }

    @Override
    public ArticlesLabels getLabelByContent(String label) {
        return articlesLablesDao.selectLabelByContent(label);
    }

    @Override
    public void updateLabelNum(ArticlesLabels label) {
        articlesLablesDao.updateLabelNum(label);

    }
}
